<?php echo use_helper('Form'); ?>

<?php slot('homeNav', 'active') ?>
<div id="wrapper">
	<?php include_partial('global/systemMessages')?>
	<div id="content">
		<div id="main">
			<div class="main-heading">
				<h1> <?php echo $summary->getTitle() ?>: <?php echo $summary->getSubTitle()?></h1>
				<h2><?php echo $summary->getCourse()->getSubject() ? $summary->getCourse()->getSubject()->getName().":" : "" ?> <?php echo $summary->getCourse()->getName() ?></h2>
			</div>
			<div id="notes" class="notes">
				<?php if($sf_user->isAuthenticated() 
					&& ($summary->getUserId() == $sf_user->getId() || $sf_user->isAdmin()
					|| $sf_user->isGroupAdmin($summary->getGroupId())
					|| $sf_user->isGroupContributor($summary->getGroupId()))): ?>
					<div style="text-align: right;">
						<?php echo link_to('Edit', 'summaries/edit?id='.$summary->getId())?>
					</div>
				<?php endif ?>
				<p><?php echo $summary->getText() ?></p>
			</div>
			<p class="writer">
				Written by 
				<?php echo $summary->getUser()->getHlFullName() ?>				
			</p>
		</div>

		<div id="sidebar">
			<?php include_component('courses', 'about', array('course_id' => $summary->getCourseId()))?>		
		
		</div>
	</div>
	
</div>



<script>

//bind all rate note links
function bindSummaryRatings()
{

	$('.star-rating').children().children().click(
			function(){

			rateNote(this);
			return false;
			}
		);
}

			$(document).ready(
			function(){
				bindNoteRatings();
				
			}
);

</script>
